package com.xxgc.demo.config;

import com.xxgc.demo.controller.interceptor.CheckIdCardDateInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author: SJY
 * @Date :2023/9/11 - 09 - 11 - 10:53
 * SpringMVC的配置
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //让身份证日期拦截器生效
        registry.addInterceptor(new CheckIdCardDateInterceptor());

    }
}
